package com.ddone.aop;
import com.ddone.aop.xml.service.CalculatorService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author ddone
 * @date 2024/3/19-22:02
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value = "classpath:application-aop.xml")
// @ContextConfiguration(classes = {AopConfig.class})
@Slf4j
public class AopTest {
    @Autowired
    private CalculatorService calculatorService;

    @Test
    public void testAop(){
        int result = calculatorService.dev(1, 5);
        log.warn("result=: "+result);
    }
}
